package com.googlecode.gamedroid;

import android.app.Activity;
import android.os.Bundle;
import android.preference.PreferenceFragment;

public class Preferences extends Activity
{
	public static class PreferencesFragment extends PreferenceFragment
	{
		@Override
		public void onCreate(Bundle savedInstanceState)
		{
			super.onCreate(savedInstanceState);
			
			addPreferencesFromResource(R.xml.preferences);
			
			// TODO disable vibration settings when no vibrator found
		}
	}
	
	public static final String PREF_RIGHT_MARGIN = "right_margin";
	public static final String PREF_ROTATE180 = "rotate180";
	public static final String PREF_VIBRATION = "vibration";
	public static final String PREF_VIBRATION_DURATION = "vibration_duration";
	
	@Override
	protected void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		
		getFragmentManager()
			.beginTransaction()
			.replace(android.R.id.content, new PreferencesFragment())
			.commit();
	}
}
